/**
 * Created by pc on 2017/3/29.
 */
import Relay from "react-relay";

export default class OrderCensusByDateMutation extends Relay.Mutation {
    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { orderCensusByDate }`;
    }

    getVariables() {
        return {
            argsInput: {
                timeBefore:this.props.timeBefore,
                timeAfter:this.props.timeAfter,
                pageNum:this.props.pageNum,
                pageSize:this.props.pageSize
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on orderCensusByDatePayload {
            orderCensusByDate {
                errorCode
                value
                totalResult
                id
                orderCensusList{
                    orderUnfinished
                    orderIncrease
                    dateTime
                    orderFinished
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on orderCensusByDatePayload {
           orderCensusByDate {
                errorCode
                value
                totalResult
                id
                orderCensusList{
                    orderUnfinished
                    orderIncrease
                    dateTime
                    orderFinished
                }
            }
                }
            `]
        }];
    }


}